const express = require("express")
const router = express.Router()

router.get("/login",(req,res)=>{
    // 接收get参数  { user: 'admin', psw: '1234567' }
    if(req.query.user === "admin" && req.query.psw === "123456"){
        res.send({err:0,msg:"login ok"})
    }else {
        res.send({err:1,msg:"login no ok"})
    }
})

module.exports = router